//
//  SYSecondModel.m
//  装修管家
//
//  Created by 千锋 on 16/1/20.
//  Copyright (c) 2016年 IOS1503薛凯. All rights reserved.
//

#import "SYSecondModel.h"
#import "InfoModel.h"
@implementation SYSecondModel
-(instancetype)initWithDic:(NSDictionary *)dic{
    if (self=[super init]) {
        self.rows=[dic objectForKey:@"rows"];
        self.title=[dic objectForKey:@"title"];
        self.oldcid=[dic objectForKey:@"oldcid"];
        self.isCollection=[dic objectForKey:@"isCollection"];
        self.webUrl=[dic objectForKey:@"webUrl"];
        self.edittime=[dic objectForKey:@"edittime"];
        self.type=[[NSString alloc] init];
        self.info=[[NSMutableArray alloc] initWithCapacity:0];
        for (NSDictionary * itemdic in [dic objectForKey:@"info"]) {
            InfoModel* model=[[InfoModel alloc] initWithDic:itemdic];
            [self.info addObject:model];
        }
    }
    return self;
}
- (NSString *)description
{
    return [NSString stringWithFormat:@">>>>>>>>>%@%@,count:%d", self.type,self.title,self.info.count];
}
@end
//"type": "2",
//"info": [
//         {
//             "rows": "8",
//             "title": "现代简约三居装潢",
//             "oldcid": "10040281",
//             "isCollection": "0",
//             "webUrl": "http://m.to8to.com/xiaoguotu/c10040281.html#from=app",
//             "edittime": "2016-01-19",
//             "info": [
//                      {
//                          "pid": "515774",
//                          "oldaid": "10458256",
//                          "filename": "http://pic.to8to.com/case/1601/19/20160119_0ad917c15bd7f89a2f9305cmexl138ad.jpg",
//                          "width": "1200",
//                          "height": "801",
//                          "likenum": "304",
//                          "webUrl": "http://m.to8to.com/xiaoguotu/p10458256.html#from=app",
//                          "isCollection": "0"
//                      },